cd "C:\Users\jedwab\Desktop\Replication Files for The Employment Profile of Cities around the World WD\Other Files\Lights"

* We import the csv files into Stata
* 2000 *
clear
import delimited "sum_DMSPRC_lights_FUAs_2000.csv"
keep efua_id efua_name _sum cntry_name cntry_iso
ren _sum sumntlrc00
sort efua_id
save ntl00, replace 
* 2010 *
clear
import delimited "sum_DMSPRC_lights_FUAs_2010.csv"
keep efua_id efua_name _sum cntry_name cntry_iso
ren _sum sumntlrc10
sort efua_id
save ntl10, replace 
* 2011 *
clear
import delimited "sum_DMSPRC_lights_FUAs_2011.csv"
keep efua_id efua_name _sum cntry_name cntry_iso
ren _sum sumntlrc11
sort efua_id
save ntl11, replace 

* We combine them
use ntl00, clear
sort efua_id
merge efua_id using ntl10
tab _m
drop _m
sort efua_id
merge efua_id using ntl11
tab _m
drop _m
sum sumntlrc*
sort efua_id
save lights, replace 

